<?php
/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * date: 2021-12-02 10:38:52
 * @LastEditors: Sam
 * @LastEditTime: 2021-12-06 15:11:27
 */
$parent_id = db('mg_menu')->insertGetId([
    'mg_module'     => $mg_module,
    'name'          => '秒杀',
    'module'        => $mg_module,
    'router'        => "",
    'controller'    => '',
    'action'        => '',
    'icon'          => 'layui-icon-star',
    'status'        => 1,
    'create_time'   => time()
]);
$parent_i_1 = db('mg_menu')->insertGetId([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_id,
    'name'          => '秒杀活动',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/index",
    'controller'    => 'Seckill',
    'action'        => 'index',
    'style'         => '',
    'status'        => 1,
    'sort'          => 1,
    'icon'          => '',
    'create_time'   => time()
]);
db('mg_menu')->insert([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_i_1,
    'name'          => '添加',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/add",
    'controller'    => 'Seckill',
    'action'        => 'add',
    'style'         => 'layui-btn-xs layui-btn-normal',
    'status'        => 1,
    'sort'          => 2,
    'icon'          => 'layui-icon-addition',
    'create_time'   => time()
]);
db('mg_menu')->insert([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_i_1,
    'name'          => '添加库存',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/add_stock",
    'controller'    => 'Seckill',
    'action'        => 'add_stock',
    'style'         => 'layui-btn-xs layui-btn-normal',
    'status'        => 1,
    'sort'          => 2,
    'icon'          => 'layui-icon-addition',
    'create_time'   => time()
]);
db('mg_menu')->insert([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_i_1,
    'name'          => '编辑',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/edit",
    'controller'    => 'Seckill',
    'action'        => 'edit',
    'style'         => 'layui-btn-xs layui-btn-normal',
    'status'        => 1,
    'sort'          => 2,
    'icon'          => 'layui-icon-edit',
    'create_time'   => time()
]);
db('mg_menu')->insert([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_i_1,
    'name'          => '删除',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/del",
    'controller'    => 'Seckill',
    'action'        => 'del',
    'style'         => 'layui-btn-xs layui-btn-danger',
    'status'        => 1,
    'icon'          => 'layui-icon-delete',
    'sort'          => 3,
    'create_time'   => time()
]);
db('mg_menu')->insert([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_i_1,
    'name'          => '切换显示',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/is_show",
    'controller'    => 'Seckill',
    'action'        => 'is_show',
    'style'         => '',
    'status'        => 1,
    'icon'          => '',
    'sort'          => 3,
    'create_time'   => time()
]);

db('mg_menu')->insert([
    'mg_module'     => $mg_module,
    'parent_id'     => $parent_id,
    'name'          => '秒杀订单',
    'module'        => $mg_module,
    'router'        => "$mg_module/Seckill/seckill_order",
    'controller'    => 'Seckill',
    'action'        => 'seckill_order',
    'style'         => '',
    'status'        => 1,
    'icon'          => '',
    'sort'          => 3,
    'create_time'   => time()
]);